package common;

import java.io.Serializable;
import java.util.Collection;

/**
 * This class is used to pass the information between client and server. 
 * Due to the nature of this application it is convenient that the informational data is passed
 * between client and server by means of serializable classes. 
 * This kind of simplification is completely sufficient for our needs. <br>
 * It implements basic methods used frequently in the rest of the code.<br>
 * Class implements interface Serializable for it is often a return object of return method. 
 */
public final class ServerListResult implements Serializable {
	/**
	 * The serial version unique identifier (SUID) of a class is a 64-bit hashcode computed from all the
	 * class's properties: its classname, the names of all interfaces which it implements, and the names
	 * and signatures of its member functions and fields. The SUID is identical for all versions of a class
	 * which are compatible under serialization.
	 * The serial version unique identifier (SUID) of a class is a 64-bit hashcode computed from all the
	 * class's properties: its classname, the names of all interfaces which it implements, and the names
	 * and signatures of its member functions and fields. The SUID is identical for all versions of a class
	 * which are compatible under serialization.
	 */
	private static final long serialVersionUID = 916911216077897300L;  // required by Serializable
	/**
	 * This Collection gathers file names available in the distributed storage. 
	 * It is essential field for the ServeListResult Class as the method list
	 * is intendet to print all files available in the cloud.
	 */
	public Collection<String> listOfFiles;
	/**
	 * Basic constructor of this class.
	 * @param listOfFiles A list of files to be passed to Client.
	 */
	public ServerListResult(Collection<String> listOfFiles){
		this.listOfFiles = listOfFiles;
	}
}
